<!DOCTYPE html>
<html class="x-admin-sm">
{include file='public/header'}
<script src="/admin/xadmin/lib/layui/upload.js" charset="utf-8"></script>

<body>
    <div class="x-body">
        <form class="layui-form" lay-filter="formAjax">
            
            <div class="layui-form-item">
                <label class="layui-form-label">
                    <span class="x-red">*</span>版权方名称
                </label>
                <div class="layui-input-block">
                    <input type="text" name="name" id="name" placeholder="版权方名称" required="required"
                        lay-verify="required" autocomplete="off" class="layui-input" value="" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    <span class="x-red">*</span>简称
                </label>
                <div class="layui-input-block">
                    <input type="text" name="abbreviation" id="abbreviation" placeholder="简称" required="required"
                        lay-verify="required" autocomplete="off" class="layui-input" value="" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    <span class="x-red">*</span>合作时间
                </label>
                <div class="layui-inline" id="hztime" style="display: flex;align-items: center;">
                    <div class="layui-input-inline">
                        <input type="text" autocomplete="off" name="start_time" id="startDate" class="layui-input"
                            placeholder="开始日期">
                    </div>
                    <div class="layui-form-mid">-</div>
                    <div class="layui-input-inline">
                        <input type="text" autocomplete="off" name="end_time" id="endDate" class="layui-input"
                            placeholder="结束日期">
                    </div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">
                    <span class="x-red">*</span>合作类型
                </label>
                <div class="layui-input-block">
                    <input type="radio" name="type" value="1" title="输入方" checked>
                    <input type="radio" name="type" value="2" title="输出方">
                </div>
            </div>
            <fieldset class="layui-elem-field layui-field-title">
                <legend style="font-size:14px;color:#000">财务信息</legend>
            </fieldset>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    收款方式
                </label>
                <div class="layui-input-block">
                    <input type="radio" name="payment_method" value="1" title="银行卡对公" checked>
                    <input type="radio" name="payment_method" value="2" title="银行卡对私">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    收款人
                </label>
                <div class="layui-input-block">
                    <input type="text" name="payee" placeholder="收款人" autocomplete="off" class="layui-input" value="" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    收款账号
                </label>
                <div class="layui-input-block">
                    <input type="number" name="collection_account" placeholder="收款账号" autocomplete="off" class="layui-input" value="" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    开户行
                </label>
                <div class="layui-input-block">
                    <input type="text" name="bank_name" placeholder="开户行" autocomplete="off" class="layui-input" value="" />
                </div>
            </div>

            <input type="hidden" name="id" id="id" value="" />
            <button id="submitData" class="layui-btn" lay-submit lay-filter="submitData" style="display: none;" />

        </form>
    </div>
    <script>
        let params = {
            addUrl: '/admin/partners/add',
            editUrl: '/admin/partners/edit',
            detailUrl: '/admin/partners/detail',
        }
        form_ajax(params)

        layui.use('laydate', function () {
            var laydate = layui.laydate;
            //日期范围
            laydate.render({
                elem: '#hztime'
                , range: ['#startDate', '#endDate']
                ,format: 'yyyy-MM-dd'
            });
        })

    </script>
</body>

</html>